<template>
  <div class="home-icon-test clearfix">
    <div class="icon-class" v-for="(item, index) in iconList" :key="index">
      <div class="icon-box">
        <icon-svg :name="item"></icon-svg>
      </div>
      <div class="icon-name">{{ item }}</div>
    </div>
  </div>
</template>

<script>
import Icon from '@/icons'
export default {
  data() {
    return {
      iconList: []
    }
  },
  created() {
    this.iconList = Icon.getNameList()
  }
}
</script>

<style lang="scss">
.home-icon-test {
  padding: 15px;
  .icon-class {
    float: left;
    width: 100px;
    height: 100px;
    text-align: center;
    margin: 0 10px;
    .icon-box {
      margin-bottom: 10px;
      font-size: 36px;
    }
    .icon-name {
      word-wrap: break-word;
    }
  }
}
</style>
